package org.jeecg.modules.business.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.business.entity.BusOrderFeeGoods;
import org.jeecg.modules.business.vo.BusOrderFeeGoodsVo;

import java.util.List;

public interface BusOrderFeeGoodsMapper  extends BaseMapper<BusOrderFeeGoods> {

    @Select("<script> select bofg.*,cg.name as name,cg.selling_price as originalPrice " +
            " from bus_order_fee_goods bofg " +
            "inner join ces_goods cg on cg.id = bofg.goods_id " +
            "where living_order_id in " +
            "<foreach collection='livingOrderIds' item='id' open='(' separator=',' close=')'> " +
            "#{id} " +
            "</foreach> " +
            " </script>")
    List<BusOrderFeeGoodsVo> queryOrderGoodDetail(List<String> livingOrderIds);

    @Select("<script> select bofg.*,cg.name as name,cg.selling_price as originalPrice " +
            " from bus_order_fee_goods bofg " +
            "inner join ces_goods cg on cg.id = bofg.goods_id " +
            "where bofg.order_fee_id in " +
            "<foreach collection='feeIds' item='id' open='(' separator=',' close=')'> " +
            "#{id} " +
            "</foreach> " +
            " </script>")
    List<BusOrderFeeGoodsVo> orderGoodDetailByFeeId(List<String> feeIds);
}
